//查询所有地址信息
export const getAddressListApi = async (memberCode) => {
	const {
		data: res
	} = await uni.$http.get(`/api/address/findAllAddressInfo/${memberCode}`)
	return res
}

//获取省市区列表
export const getAreaApi = async () => {
	const {
		data: res
	} = await uni.$http.get('/api/area/list')
	return res
}

//添加收货地址
export const addAddressApi = async (data) => {
	const {
		data: res
	} = await uni.$http.post('/api/address/addAddressInfo', data)
	return res
}

//查看单个地址详情
export const getAddressDetailApi = async (id) => {
	const {
		data: res
	} = await uni.$http.get(`/api/address/getAddressDetails/${id}`)
	return res
}

//删除地址
export const delAddressApi = async (ids) => {
	const {
		data: res
	} = await uni.$http.delete(`/api/address/deleteAddress/${ids}`)
	return res
}
